Class: Gitara::Node::Tab
- Inherits:
-
Base
- Object
- Valuable
- Base
- Gitara::Node::Tab
show all
- Defined in:
- lib/gitara/node/tab.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Base
#add, #ancestor, #call_value, #children=, #chorded, #definition, #definition?, #definition_children, #definition_name, #definition_of?, #definitions, #descendants, #id, #id_as_word, #inspect, #name, #stanza_version, #value, #voiced_as
Instance Attribute Details
#$1($1) ⇒ Object
6
|
# File 'lib/gitara/node/tab.rb', line 6
has_value :arranger
|
Instance Method Details
#arranger ⇒ Object
6
|
# File 'lib/gitara/node/tab.rb', line 6
has_value :arranger
|
#composer ⇒ Object
7
|
# File 'lib/gitara/node/tab.rb', line 7
has_value :composer
|
#instrument ⇒ Object
8
|
# File 'lib/gitara/node/tab.rb', line 8
has_value :instrument
|
#key ⇒ Object
9
|
# File 'lib/gitara/node/tab.rb', line 9
has_value :key
|
#max_number_of_voices ⇒ Object
17
18
19
|
# File 'lib/gitara/node/tab.rb', line 17
def max_number_of_voices
definitions(Node::Bar).map{|bar| bar.note_sets.size}.max
end
|
#midi_instrument ⇒ Object
10
|
# File 'lib/gitara/node/tab.rb', line 10
has_value :midi_instrument, :default => "acoustic guitar (nylon)"
|
#playable_child ⇒ Object
21
22
23
|
# File 'lib/gitara/node/tab.rb', line 21
def playable_child
definition_children.last
end
|
#string_tunings ⇒ Object
11
|
# File 'lib/gitara/node/tab.rb', line 11
has_value :string_tunings
|
#tempo ⇒ Object
12
|
# File 'lib/gitara/node/tab.rb', line 12
has_value :tempo
|
#time ⇒ Object
13
|
# File 'lib/gitara/node/tab.rb', line 13
has_value :time
|
#time_signature ⇒ Object
25
26
27
|
# File 'lib/gitara/node/tab.rb', line 25
def time_signature
@time_signature ||= TimeSignature.new(:value => time || '4/4')
end
|
#title ⇒ Object
14
|
# File 'lib/gitara/node/tab.rb', line 14
has_value :title
|
#transposition ⇒ Object
15
|
# File 'lib/gitara/node/tab.rb', line 15
has_value :transposition
|
#voices ⇒ Object
29
30
31
|
# File 'lib/gitara/node/tab.rb', line 29
def voices
@voices ||= Array.new(max_number_of_voices){|i| Voice.new(:id => i + 1, :parent => self)}
end
|